An NFC technology is a short-range wireless connection technology. In the technology, magnetic field induction may be used to implement near field communication between electronic devices (also referred to as “NFC devices”) having an NFC function. An NFC device mainly includes three functional entities: a device host (DH, Device Host), an NFC controller (NFCC, NFC Controller), and an NFC execution environment (NFCEE, NFC Execution Environment). In the NFC technology, the NFC controller interface (NCI, NFC Controller Interface) protocol mainly defines a logical interface used to implement communication between the DH and the NFCC of the NFC device, and two NFC devices communicating in a peer-to-peer (P2P, Peer-to-Peer) mode should comply with the Near Field Communication Data Exchange Protocol (NFC-DEP, NFC-Data Exchange Protocol).
The Digital specification (a full name is NFC digital protocol technical specification) formulated by the NFC forum (NFC Forum) stipulates: Before communicating by using the NFC-DEP protocol, the two NFC devices performing peer-to-peer communication negotiate, by using an attribute request (ATR_REQ, Attribute Request) and an attribute response (ATR_RES, Attribute Response), with each other about maximum length values LRI and LRT of data packets transmitted in a subsequent communication process. LRI is set by an NFC device used as an initiator (initiator) and is used to limit a length of a data packet sent by an NFC device used as a target (target), and LRT is set by the NFC device used as the target and is used to limit a length of a data packet sent by the NFC device used as the initiator. Then, the NFC device used as the initiator and the NFC device used as the target may adjust, by using a parameter selection request (PSL_REQ, Parameter Selection Request), a maximum length value LR of data packets transmitted in the subsequent communication process. LR is less than or equal to LRI and LRT, that is, LR is a method for negotiating, by two NFC chips, about a length of a communication data packet.
The NCI protocol is used to stipulate how to configure a parameter, a command, and the like that are used when an NFC chip communicates with a peer NFC chip. Certainly, the NCI protocol does not provide a function of guiding an NFC chip how to adjust, by using the PSL_REQ defined in the Digital protocol, the maximum length value LR of the data packets transmitted in the subsequent communication process.